<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/js/ext/resources/css/ext-all.css"/>

    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/adapter/ext/ext-base.js"; ?>"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/ext-all.js"; ?>"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/ext-lang-es.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/ext/plugins/searchfield.js"; ?>"></script>
    <script type="text/javascript">
    var BASE_URL = '<?php echo base_url(); ?>' + 'index.php/';
    var BASE_PATH = '<?php echo base_url(); ?>';
    var BASE_ICONS = BASE_PATH + 'assets/icons/';
    Ext.onReady(function() {

    	  var strProducto = new Ext.data.Store({
              reader: new Ext.data.JsonReader({
                  fields: [
                      'idProducto', 'producto'
                  ],
                  root: 'rows', totalProperty: 'results'
              }),
              proxy: new Ext.data.HttpProxy({
                  url: BASE_URL + 'producto/productoSelect',
                  method: 'POST'
              })
          });

    	  function estiloCelda(val) {	
              return '<b>' + val  +'</b>';
          }

        var gridUsersListaProductos = new Ext.grid.EditorGridPanel({
            title: '',
            store: strProducto, 
            style: 'margin:0 auto;', height: 575, width: 405,
            columns: [{
                header: "Producto",
                dataIndex: 'producto',
                sortable: true,
                width: 300,
                renderer: estiloCelda
            },{
                header: "Costo",
                dataIndex: 'costo',
                sortable: true,
                width: 100,
                renderer: estiloCelda
            }
            ]
        });

        gridUsersListaProductos.render('divgrid');
        strProducto.load();
    });
    </script>
    <style type="text/css">
        
    </style>

    <title></title>
</head>
<body>
    <div id="divgrid"></div>
</body>
</html>